package com.osce.score.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csce.domain.entity.score.ScoreSkill;
import com.osce.common.utils.DateUtils;
import com.osce.interfaces.score.IScoreSkillService;
import com.osce.score.mapper.ScoreSkillMapper;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * 技能管理Service业务层处理
 *
 * @author zzx
 * @since 2023-08-21
 */
@Service
public class ScoreSkillServiceImpl extends ServiceImpl<ScoreSkillMapper, ScoreSkill> implements IScoreSkillService {


    /**
     * 查询技能管理
     *
     * @param id 技能管理主键
     * @return 技能管理
     */
    @Override
    public ScoreSkill selectScoreSkillById(Long id) {
        return baseMapper.selectScoreSkillById(id);
    }

    /**
     * 查询技能管理列表
     *
     * @param scoreSkill 技能管理
     * @return 技能管理
     */
    @Override
    public List<ScoreSkill> selectScoreSkillList(ScoreSkill scoreSkill) {
        return baseMapper.selectScoreSkillList(scoreSkill);
    }

    /**
     * 新增技能管理
     *
     * @param scoreSkill 技能管理
     * @return 结果
     */
    @Override
    public int insertScoreSkill(ScoreSkill scoreSkill) {
        scoreSkill.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertScoreSkill(scoreSkill);
    }

    /**
     * 修改技能管理
     *
     * @param scoreSkill 技能管理
     * @return 结果
     */
    @Override
    public int updateScoreSkill(ScoreSkill scoreSkill) {
        return baseMapper.updateScoreSkill(scoreSkill);
    }

    /**
     * 批量删除技能管理
     *
     * @param ids 需要删除的技能管理主键
     * @return 结果
     */
    @Override
    public int deleteScoreSkillByIds(Long[] ids) {
        return baseMapper.deleteScoreSkillByIds(ids);
    }

    /**
     * 删除技能管理信息
     *
     * @param id 技能管理主键
     * @return 结果
     */
    @Override
    public int deleteScoreSkillById(Long id) {
        return baseMapper.deleteScoreSkillById(id);
    }

    @Override
    public List<ScoreSkill> selectScoreSkillListByIds(Collection<Long> allSkillIds) {
        return baseMapper.selectScoreSkillListByIds(allSkillIds);
    }
}
